package top.stmo.blog.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.stmo.blog.dao.vo.Result;
import top.stmo.blog.service.LoginService;

@RestController
@RequestMapping("/logout")
public class LogoutController {

    @Autowired
    private LoginService loginService;

    @GetMapping
    public Result logout(@RequestHeader("Authorization") String token) {
        //登录 验证用户 访问验证表
        return loginService.logout(token);
    }

}
